<? // init - initialize page

require_once ('../ajax/dd.php');

$_SESSION['rand'] = (integer)($_GET['rand']);

//-foreach( $_SESSION as $key=>$val ) echo "SESSION $key = $val<br/>";
//-exit;

// if logged in
if( $_SESSION['login'] ) {
	ajax_exit( 'success', "welcome {$_SESSION['name']}", array( 'login'=>@$_SESSION['login'],
			'name'=>@$_SESSION['name'], 'login_ts'=>@$_SESSION['login_ts'],
			'admin'=>@$_SESSION['admin'], 'superuser'=>@$_SESSION['superuser'],
			'dd'=>$dd ) );
//-} else	ajax_exit( 'success', "welcome to Chess Spider ({$_SESSION['rand']}) (".session_id().")", array( 'dd'=>$dd ) );
} else	ajax_exit( 'success', "welcome to Chess Spider", array( 'dd'=>$dd ) );

exit;

?>
